package exception;

/**
 * @author xiehaidong
 */

public enum CommonError {
    CODE_UNKOWN_ERROR("执行过程异常，请重试", 10001),
    CODE_PARAMS_ERROR("非法参数", 10002),
    CODE_OBJECT_NULL("对象为空", 10003),
    CODE_QUERY_NULL("查询结果为空", 10004),
    CODE_REQUEST_NULL("请求参数为空", 10005);

    private final String errorMessage;
    private final int errorCode;

    public String getErrorMessage() {
        return errorMessage;
    }

    public int getErrorCode() {
        return errorCode;
    }

    private CommonError(String errMessage, int errorCode) {
        this.errorMessage = errMessage;
        this.errorCode = errorCode;
    }
}